3.3.17 \(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx\) [217]

3.3.17.1 Optimal result
3.3.17.2 Mathematica [A] (verified)
3.3.17.3 Rubi [A] (verified)
3.3.17.4 Maple [A] (verified)
3.3.17.5 Fricas [A] (verification not implemented)
3.3.17.6 Sympy [F]
3.3.17.7 Maxima [B] (verification not implemented)
3.3.17.8 Giac [B] (verification not implemented)
3.3.17.9 Mupad [B] (verification not implemented)

3.3.17.1 Optimal result

Integrand size = 31, antiderivative size = 258 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {5 (2 c-d) d^2 \left (2 c^2-3 c d+2 d^2\right ) \text {arctanh}(\sin (e+f x))}{2 a^2 f}-\frac {d \left (c^2+10 c d-12 d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a^2 f}+\frac {(c-d) (c+10 d) (c+d \sec (e+f x))^3 \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac {(c-d) (c+d \sec (e+f x))^4 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac {d \left (4 \left (c^4+10 c^3 d-44 c^2 d^2+40 c d^3-12 d^4\right )+d \left (2 c^3+20 c^2 d-57 c d^2+30 d^3\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a^2 f} \]

output
5/2*(2*c-d)*d^2*(2*c^2-3*c*d+2*d^2)*arctanh(sin(f*x+e))/a^2/f-1/3*d*(c^2+1 
0*c*d-12*d^2)*(c+d*sec(f*x+e))^2*tan(f*x+e)/a^2/f+1/3*(c-d)*(c+10*d)*(c+d* 
sec(f*x+e))^3*tan(f*x+e)/f/(a^2+a^2*sec(f*x+e))+1/3*(c-d)*(c+d*sec(f*x+e)) 
^4*tan(f*x+e)/f/(a+a*sec(f*x+e))^2-1/6*d*(4*c^4+40*c^3*d-176*c^2*d^2+160*c 
*d^3-48*d^4+d*(2*c^3+20*c^2*d-57*c*d^2+30*d^3)*sec(f*x+e))*tan(f*x+e)/a^2/ 
f
 
3.3.17.2 Mathematica [A] (verified)

Time = 7.42 (sec) , antiderivative size = 446, normalized size of antiderivative = 1.73 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {240 d^2 \left (-4 c^3+8 c^2 d-7 c d^2+2 d^3\right ) \cos ^4\left (\frac {1}{2} (e+f x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )+2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (6 c^5+15 c^4 d-120 c^3 d^2+420 c^2 d^3-300 c d^4+104 d^5+\left (6 c^5+60 c^4 d-300 c^3 d^2+840 c^2 d^3-585 c d^4+190 d^5\right ) \cos (e+f x)+4 \left (2 c^5+5 c^4 d-40 c^3 d^2+130 c^2 d^3-95 c d^4+30 d^5\right ) \cos (2 (e+f x))+2 c^5 \cos (3 (e+f x))+20 c^4 d \cos (3 (e+f x))-100 c^3 d^2 \cos (3 (e+f x))+280 c^2 d^3 \cos (3 (e+f x))-215 c d^4 \cos (3 (e+f x))+66 d^5 \cos (3 (e+f x))+2 c^5 \cos (4 (e+f x))+5 c^4 d \cos (4 (e+f x))-40 c^3 d^2 \cos (4 (e+f x))+100 c^2 d^3 \cos (4 (e+f x))-80 c d^4 \cos (4 (e+f x))+24 d^5 \cos (4 (e+f x))\right ) \sec ^3(e+f x) \sin \left (\frac {1}{2} (e+f x)\right )}{24 a^2 f (1+\cos (e+f x))^2} \]

input
Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^5)/(a + a*Sec[e + f*x])^2,x]
 
output
(240*d^2*(-4*c^3 + 8*c^2*d - 7*c*d^2 + 2*d^3)*Cos[(e + f*x)/2]^4*(Log[Cos[ 
(e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2] 
]) + 2*Cos[(e + f*x)/2]*(6*c^5 + 15*c^4*d - 120*c^3*d^2 + 420*c^2*d^3 - 30 
0*c*d^4 + 104*d^5 + (6*c^5 + 60*c^4*d - 300*c^3*d^2 + 840*c^2*d^3 - 585*c* 
d^4 + 190*d^5)*Cos[e + f*x] + 4*(2*c^5 + 5*c^4*d - 40*c^3*d^2 + 130*c^2*d^ 
3 - 95*c*d^4 + 30*d^5)*Cos[2*(e + f*x)] + 2*c^5*Cos[3*(e + f*x)] + 20*c^4* 
d*Cos[3*(e + f*x)] - 100*c^3*d^2*Cos[3*(e + f*x)] + 280*c^2*d^3*Cos[3*(e + 
 f*x)] - 215*c*d^4*Cos[3*(e + f*x)] + 66*d^5*Cos[3*(e + f*x)] + 2*c^5*Cos[ 
4*(e + f*x)] + 5*c^4*d*Cos[4*(e + f*x)] - 40*c^3*d^2*Cos[4*(e + f*x)] + 10 
0*c^2*d^3*Cos[4*(e + f*x)] - 80*c*d^4*Cos[4*(e + f*x)] + 24*d^5*Cos[4*(e + 
 f*x)])*Sec[e + f*x]^3*Sin[(e + f*x)/2])/(24*a^2*f*(1 + Cos[e + f*x])^2)
 
3.3.17.3 Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 392, normalized size of antiderivative = 1.52, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.419, Rules used = {3042, 4475, 109, 25, 27, 167, 27, 170, 25, 27, 164, 45, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a \sec (e+f x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^5}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2}dx\)

\(\Big \downarrow \) 4475

\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {(c+d \sec (e+f x))^5}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{5/2}}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 109

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (-\frac {\int -\frac {a^2 (c+d \sec (e+f x))^3 \left (c^2+6 d c-4 d^2-3 (c-2 d) d \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2}}d\sec (e+f x)}{3 a^3}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {a^2 (c+d \sec (e+f x))^3 \left (c^2+6 d c-4 d^2-3 (c-2 d) d \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2}}d\sec (e+f x)}{3 a^3}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {(c+d \sec (e+f x))^3 \left (c^2+6 d c-4 d^2-3 (c-2 d) d \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2}}d\sec (e+f x)}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 167

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {\int \frac {3 a^2 d (c+d \sec (e+f x))^2 \left ((11 c-10 d) d-\left (c^2+10 d c-12 d^2\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{a^3}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \int \frac {(c+d \sec (e+f x))^2 \left ((11 c-10 d) d-\left (c^2+10 d c-12 d^2\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 170

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}-\frac {\int -\frac {a^2 (c+d \sec (e+f x)) \left (d \left (31 c^2-50 d c+24 d^2\right )-\left (2 c^3+20 d c^2-57 d^2 c+30 d^3\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {\int \frac {a^2 (c+d \sec (e+f x)) \left (d \left (31 c^2-50 d c+24 d^2\right )-\left (2 c^3+20 d c^2-57 d^2 c+30 d^3\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{3 a^2}+\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {1}{3} \int \frac {(c+d \sec (e+f x)) \left (d \left (31 c^2-50 d c+24 d^2\right )-\left (2 c^3+20 d c^2-57 d^2 c+30 d^3\right ) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)+\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 164

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {1}{3} \left (\frac {15}{2} d (2 c-d) \left (2 c^2-3 c d+2 d^2\right ) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)+\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (d \left (2 c^3+20 c^2 d-57 c d^2+30 d^3\right ) \sec (e+f x)+4 \left (c^4+10 c^3 d-44 c^2 d^2+40 c d^3-12 d^4\right )\right )}{2 a^2}\right )+\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 45

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {1}{3} \left (15 d (2 c-d) \left (2 c^2-3 c d+2 d^2\right ) \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}+\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (d \left (2 c^3+20 c^2 d-57 c d^2+30 d^3\right ) \sec (e+f x)+4 \left (c^4+10 c^3 d-44 c^2 d^2+40 c d^3-12 d^4\right )\right )}{2 a^2}\right )+\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {3 d \left (\frac {1}{3} \left (\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (d \left (2 c^3+20 c^2 d-57 c d^2+30 d^3\right ) \sec (e+f x)+4 \left (c^4+10 c^3 d-44 c^2 d^2+40 c d^3-12 d^4\right )\right )}{2 a^2}-\frac {15 d (2 c-d) \left (2 c^2-3 c d+2 d^2\right ) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a \sec (e+f x)+a}}\right )}{a}\right )+\frac {\left (c^2+10 c d-12 d^2\right ) \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} (c+d \sec (e+f x))^2}{3 a^2}\right )}{a}-\frac {(c-d) (c+10 d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^3}{a^2 \sqrt {a \sec (e+f x)+a}}}{3 a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^4}{3 a^2 (a \sec (e+f x)+a)^{3/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

input
Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^5)/(a + a*Sec[e + f*x])^2,x]
 
output
-((a^2*(-1/3*((c - d)*Sqrt[a - a*Sec[e + f*x]]*(c + d*Sec[e + f*x])^4)/(a^ 
2*(a + a*Sec[e + f*x])^(3/2)) + (-(((c - d)*(c + 10*d)*Sqrt[a - a*Sec[e + 
f*x]]*(c + d*Sec[e + f*x])^3)/(a^2*Sqrt[a + a*Sec[e + f*x]])) + (3*d*(((c^ 
2 + 10*c*d - 12*d^2)*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]*(c 
+ d*Sec[e + f*x])^2)/(3*a^2) + ((-15*(2*c - d)*d*(2*c^2 - 3*c*d + 2*d^2)*A 
rcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]]])/a + (Sqrt[a - a* 
Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]*(4*(c^4 + 10*c^3*d - 44*c^2*d^2 + 4 
0*c*d^3 - 12*d^4) + d*(2*c^3 + 20*c^2*d - 57*c*d^2 + 30*d^3)*Sec[e + f*x]) 
)/(2*a^2))/3))/a)/(3*a))*Tan[e + f*x])/(f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a 
+ a*Sec[e + f*x]]))
 

3.3.17.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 109
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[(b*c - a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f 
*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Simp[1/(b*(b*e - a*f)*(m + 1)) 
 Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) 
+ c*f*(p + 1)) + b*c*(d*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) 
 + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /; FreeQ[{a, b, c, 
d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || 
IntegersQ[m, n + p] || IntegersQ[p, m + n])
 

rule 164
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ 
))*((g_.) + (h_.)*(x_)), x_] :> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - 
 b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)^(m + 1)*(( 
c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Simp[(a^2*d^2*f*h 
*(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 
3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + 
d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3))   Int[( 
a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] 
&& NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]
 

rule 167
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + 
 d*x)^n*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] - Simp[1/(b*(b*e - 
a*f)*(m + 1))   Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b* 
c*(f*g - e*h)*(m + 1) + (b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h 
)*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; FreeQ[{a, b, c, d, 
e, f, g, h, p}, x] && LtQ[m, -1] && GtQ[n, 0] && IntegersQ[2*m, 2*n, 2*p]
 

rule 170
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*(( 
e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Simp[1/(d*f*(m + n + p + 2)) 
  Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2 
) - h*(b*c*e*m + a*(d*e*(n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) 
+ h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x], x], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] 
 && IntegerQ[m]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4475
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a 
^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) 
 Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x 
], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ 
b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In 
tegerQ[m - 1/2])
 
3.3.17.4 Maple [A] (verified)

Time = 1.27 (sec) , antiderivative size = 382, normalized size of antiderivative = 1.48

method result size
parallelrisch \(\frac {-360 \left (c -\frac {d}{2}\right ) \left (c^{2}-\frac {3}{2} c d +d^{2}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+360 \left (c -\frac {d}{2}\right ) \left (c^{2}-\frac {3}{2} c d +d^{2}\right ) \left (\cos \left (f x +e \right )+\frac {\cos \left (3 f x +3 e \right )}{3}\right ) d^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+2 \sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (\left (c^{5}+33 d^{5}+10 c^{4} d -50 c^{3} d^{2}+140 c^{2} d^{3}-\frac {215}{2} c \,d^{4}\right ) \cos \left (3 f x +3 e \right )+\left (4 c^{5}+10 c^{4} d -80 c^{3} d^{2}+260 c^{2} d^{3}-190 c \,d^{4}+60 d^{5}\right ) \cos \left (2 f x +2 e \right )+\left (c^{5}+12 d^{5}+\frac {5}{2} c^{4} d -20 c^{3} d^{2}+50 c^{2} d^{3}-40 c \,d^{4}\right ) \cos \left (4 f x +4 e \right )+\left (95 d^{5}-150 c^{3} d^{2}+3 c^{5}+30 c^{4} d +420 c^{2} d^{3}-\frac {585}{2} c \,d^{4}\right ) \cos \left (f x +e \right )+52 d^{5}+3 c^{5}+\frac {15 c^{4} d}{2}-60 c^{3} d^{2}+210 c^{2} d^{3}-150 c \,d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{12 f \,a^{2} \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) \(382\)
derivativedivides \(\frac {-\frac {c^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {5 c^{4} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\frac {10 c^{3} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {10 c^{2} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\frac {5 c \,d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+c^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+5 c^{4} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-30 c^{3} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+50 c^{2} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-35 c \,d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+9 d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {2 d^{5}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\frac {5 d^{3} \left (4 c^{2}-5 c d +2 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}+\frac {d^{4} \left (5 c -3 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {2 d^{5}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {5 d^{3} \left (4 c^{2}-5 c d +2 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {d^{4} \left (5 c -3 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{2 f \,a^{2}}\) \(436\)
default \(\frac {-\frac {c^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {5 c^{4} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\frac {10 c^{3} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {10 c^{2} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\frac {5 c \,d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+c^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+5 c^{4} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-30 c^{3} d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+50 c^{2} d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-35 c \,d^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+9 d^{5} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {2 d^{5}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\frac {5 d^{3} \left (4 c^{2}-5 c d +2 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}+\frac {d^{4} \left (5 c -3 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {2 d^{5}}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {5 d^{3} \left (4 c^{2}-5 c d +2 d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {d^{4} \left (5 c -3 d \right )}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}}{2 f \,a^{2}}\) \(436\)
norman \(\frac {-\frac {\left (c^{5}-5 c^{4} d +10 c^{3} d^{2}-10 c^{2} d^{3}+5 c \,d^{4}-d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{13}}{6 a f}-\frac {\left (c^{5}+5 c^{4} d -30 c^{3} d^{2}+90 c^{2} d^{3}-65 c \,d^{4}+21 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a f}+\frac {10 \left (2 c^{5}+5 c^{4} d -40 c^{3} d^{2}+94 c^{2} d^{3}-77 c \,d^{4}+23 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{3 a f}+\frac {\left (4 c^{5}-5 c^{4} d -20 c^{3} d^{2}+50 c^{2} d^{3}-40 c \,d^{4}+11 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{11}}{3 a f}-\frac {5 \left (5 c^{5}+5 c^{4} d -70 c^{3} d^{2}+154 c^{2} d^{3}-125 c \,d^{4}+37 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{6 a f}+\frac {\left (8 c^{5}+35 c^{4} d -220 c^{3} d^{2}+610 c^{2} d^{3}-470 c \,d^{4}+143 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a f}-\frac {\left (35 c^{5}+125 c^{4} d -850 c^{3} d^{2}+2170 c^{2} d^{3}-1745 c \,d^{4}+521 d^{5}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{6 a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{5} a}-\frac {5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 a^{2} f}+\frac {5 d^{2} \left (4 c^{3}-8 c^{2} d +7 c \,d^{2}-2 d^{3}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 a^{2} f}\) \(514\)
risch \(\text {Expression too large to display}\) \(1003\)

input
int(sec(f*x+e)*(c+d*sec(f*x+e))^5/(a+a*sec(f*x+e))^2,x,method=_RETURNVERBO 
SE)
 
output
1/12*(-360*(c-1/2*d)*(c^2-3/2*c*d+d^2)*(cos(f*x+e)+1/3*cos(3*f*x+3*e))*d^2 
*ln(tan(1/2*f*x+1/2*e)-1)+360*(c-1/2*d)*(c^2-3/2*c*d+d^2)*(cos(f*x+e)+1/3* 
cos(3*f*x+3*e))*d^2*ln(tan(1/2*f*x+1/2*e)+1)+2*sec(1/2*f*x+1/2*e)^2*((c^5+ 
33*d^5+10*c^4*d-50*c^3*d^2+140*c^2*d^3-215/2*c*d^4)*cos(3*f*x+3*e)+(4*c^5+ 
10*c^4*d-80*c^3*d^2+260*c^2*d^3-190*c*d^4+60*d^5)*cos(2*f*x+2*e)+(c^5+12*d 
^5+5/2*c^4*d-20*c^3*d^2+50*c^2*d^3-40*c*d^4)*cos(4*f*x+4*e)+(95*d^5-150*c^ 
3*d^2+3*c^5+30*c^4*d+420*c^2*d^3-585/2*c*d^4)*cos(f*x+e)+52*d^5+3*c^5+15/2 
*c^4*d-60*c^3*d^2+210*c^2*d^3-150*c*d^4)*tan(1/2*f*x+1/2*e))/f/a^2/(cos(3* 
f*x+3*e)+3*cos(f*x+e))
 
3.3.17.5 Fricas [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 456, normalized size of antiderivative = 1.77 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {15 \, {\left ({\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{4} + {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left ({\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{5} + 2 \, {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{4} + {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, d^{5} + 2 \, {\left (2 \, c^{5} + 5 \, c^{4} d - 40 \, c^{3} d^{2} + 100 \, c^{2} d^{3} - 80 \, c d^{4} + 24 \, d^{5}\right )} \cos \left (f x + e\right )^{4} + {\left (2 \, c^{5} + 20 \, c^{4} d - 100 \, c^{3} d^{2} + 280 \, c^{2} d^{3} - 215 \, c d^{4} + 66 \, d^{5}\right )} \cos \left (f x + e\right )^{3} + 6 \, {\left (10 \, c^{2} d^{3} - 5 \, c d^{4} + 2 \, d^{5}\right )} \cos \left (f x + e\right )^{2} + {\left (15 \, c d^{4} - 2 \, d^{5}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{12 \, {\left (a^{2} f \cos \left (f x + e\right )^{5} + 2 \, a^{2} f \cos \left (f x + e\right )^{4} + a^{2} f \cos \left (f x + e\right )^{3}\right )}} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^5/(a+a*sec(f*x+e))^2,x, algorithm="f 
ricas")
 
output
1/12*(15*((4*c^3*d^2 - 8*c^2*d^3 + 7*c*d^4 - 2*d^5)*cos(f*x + e)^5 + 2*(4* 
c^3*d^2 - 8*c^2*d^3 + 7*c*d^4 - 2*d^5)*cos(f*x + e)^4 + (4*c^3*d^2 - 8*c^2 
*d^3 + 7*c*d^4 - 2*d^5)*cos(f*x + e)^3)*log(sin(f*x + e) + 1) - 15*((4*c^3 
*d^2 - 8*c^2*d^3 + 7*c*d^4 - 2*d^5)*cos(f*x + e)^5 + 2*(4*c^3*d^2 - 8*c^2* 
d^3 + 7*c*d^4 - 2*d^5)*cos(f*x + e)^4 + (4*c^3*d^2 - 8*c^2*d^3 + 7*c*d^4 - 
 2*d^5)*cos(f*x + e)^3)*log(-sin(f*x + e) + 1) + 2*(2*d^5 + 2*(2*c^5 + 5*c 
^4*d - 40*c^3*d^2 + 100*c^2*d^3 - 80*c*d^4 + 24*d^5)*cos(f*x + e)^4 + (2*c 
^5 + 20*c^4*d - 100*c^3*d^2 + 280*c^2*d^3 - 215*c*d^4 + 66*d^5)*cos(f*x + 
e)^3 + 6*(10*c^2*d^3 - 5*c*d^4 + 2*d^5)*cos(f*x + e)^2 + (15*c*d^4 - 2*d^5 
)*cos(f*x + e))*sin(f*x + e))/(a^2*f*cos(f*x + e)^5 + 2*a^2*f*cos(f*x + e) 
^4 + a^2*f*cos(f*x + e)^3)
 
3.3.17.6 Sympy [F]

\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {\int \frac {c^{5} \sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{5} \sec ^{6}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {5 c d^{4} \sec ^{5}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {10 c^{2} d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {10 c^{3} d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {5 c^{4} d \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))**5/(a+a*sec(f*x+e))**2,x)
 
output
(Integral(c**5*sec(e + f*x)/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + I 
ntegral(d**5*sec(e + f*x)**6/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + 
Integral(5*c*d**4*sec(e + f*x)**5/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), 
x) + Integral(10*c**2*d**3*sec(e + f*x)**4/(sec(e + f*x)**2 + 2*sec(e + f* 
x) + 1), x) + Integral(10*c**3*d**2*sec(e + f*x)**3/(sec(e + f*x)**2 + 2*s 
ec(e + f*x) + 1), x) + Integral(5*c**4*d*sec(e + f*x)**2/(sec(e + f*x)**2 
+ 2*sec(e + f*x) + 1), x))/a**2
 
3.3.17.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 772 vs. \(2 (247) = 494\).

Time = 0.24 (sec) , antiderivative size = 772, normalized size of antiderivative = 2.99 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\text {Too large to display} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^5/(a+a*sec(f*x+e))^2,x, algorithm="m 
axima")
 
output
1/6*(d^5*(4*(9*sin(f*x + e)/(cos(f*x + e) + 1) - 20*sin(f*x + e)^3/(cos(f* 
x + e) + 1)^3 + 15*sin(f*x + e)^5/(cos(f*x + e) + 1)^5)/(a^2 - 3*a^2*sin(f 
*x + e)^2/(cos(f*x + e) + 1)^2 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 
 - a^2*sin(f*x + e)^6/(cos(f*x + e) + 1)^6) + (27*sin(f*x + e)/(cos(f*x + 
e) + 1) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - 30*log(sin(f*x + e)/( 
cos(f*x + e) + 1) + 1)/a^2 + 30*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a 
^2) - 5*c*d^4*(6*(3*sin(f*x + e)/(cos(f*x + e) + 1) - 5*sin(f*x + e)^3/(co 
s(f*x + e) + 1)^3)/(a^2 - 2*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2* 
sin(f*x + e)^4/(cos(f*x + e) + 1)^4) + (21*sin(f*x + e)/(cos(f*x + e) + 1) 
 + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - 21*log(sin(f*x + e)/(cos(f*x 
 + e) + 1) + 1)/a^2 + 21*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a^2) + 1 
0*c^2*d^3*((15*sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^3/(cos(f*x + 
 e) + 1)^3)/a^2 - 12*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^2 + 12*log 
(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a^2 + 12*sin(f*x + e)/((a^2 - a^2*si 
n(f*x + e)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1))) - 10*c^3*d^2*((9*s 
in(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 
- 6*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^2 + 6*log(sin(f*x + e)/(cos 
(f*x + e) + 1) - 1)/a^2) + 5*c^4*d*(3*sin(f*x + e)/(cos(f*x + e) + 1) + si 
n(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 + c^5*(3*sin(f*x + e)/(cos(f*x + e) 
 + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2)/f
 
3.3.17.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 506 vs. \(2 (247) = 494\).

Time = 0.44 (sec) , antiderivative size = 506, normalized size of antiderivative = 1.96 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {\frac {15 \, {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} - \frac {15 \, {\left (4 \, c^{3} d^{2} - 8 \, c^{2} d^{3} + 7 \, c d^{4} - 2 \, d^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}} - \frac {2 \, {\left (60 \, c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 75 \, c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 30 \, d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 120 \, c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 120 \, c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 40 \, d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 60 \, c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 45 \, c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 18 \, d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{3} a^{2}} - \frac {a^{4} c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 5 \, a^{4} c^{4} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 10 \, a^{4} c^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 10 \, a^{4} c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 5 \, a^{4} c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - a^{4} d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, a^{4} c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 15 \, a^{4} c^{4} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 90 \, a^{4} c^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 150 \, a^{4} c^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 105 \, a^{4} c d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 27 \, a^{4} d^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{6}}}{6 \, f} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^5/(a+a*sec(f*x+e))^2,x, algorithm="g 
iac")
 
output
1/6*(15*(4*c^3*d^2 - 8*c^2*d^3 + 7*c*d^4 - 2*d^5)*log(abs(tan(1/2*f*x + 1/ 
2*e) + 1))/a^2 - 15*(4*c^3*d^2 - 8*c^2*d^3 + 7*c*d^4 - 2*d^5)*log(abs(tan( 
1/2*f*x + 1/2*e) - 1))/a^2 - 2*(60*c^2*d^3*tan(1/2*f*x + 1/2*e)^5 - 75*c*d 
^4*tan(1/2*f*x + 1/2*e)^5 + 30*d^5*tan(1/2*f*x + 1/2*e)^5 - 120*c^2*d^3*ta 
n(1/2*f*x + 1/2*e)^3 + 120*c*d^4*tan(1/2*f*x + 1/2*e)^3 - 40*d^5*tan(1/2*f 
*x + 1/2*e)^3 + 60*c^2*d^3*tan(1/2*f*x + 1/2*e) - 45*c*d^4*tan(1/2*f*x + 1 
/2*e) + 18*d^5*tan(1/2*f*x + 1/2*e))/((tan(1/2*f*x + 1/2*e)^2 - 1)^3*a^2) 
- (a^4*c^5*tan(1/2*f*x + 1/2*e)^3 - 5*a^4*c^4*d*tan(1/2*f*x + 1/2*e)^3 + 1 
0*a^4*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 10*a^4*c^2*d^3*tan(1/2*f*x + 1/2*e) 
^3 + 5*a^4*c*d^4*tan(1/2*f*x + 1/2*e)^3 - a^4*d^5*tan(1/2*f*x + 1/2*e)^3 - 
 3*a^4*c^5*tan(1/2*f*x + 1/2*e) - 15*a^4*c^4*d*tan(1/2*f*x + 1/2*e) + 90*a 
^4*c^3*d^2*tan(1/2*f*x + 1/2*e) - 150*a^4*c^2*d^3*tan(1/2*f*x + 1/2*e) + 1 
05*a^4*c*d^4*tan(1/2*f*x + 1/2*e) - 27*a^4*d^5*tan(1/2*f*x + 1/2*e))/a^6)/ 
f
 
3.3.17.9 Mupad [B] (verification not implemented)

Time = 13.55 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.04 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^5}{(a+a \sec (e+f x))^2} \, dx=\frac {5\,d^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (2\,c-d\right )\,\left (2\,c^2-3\,c\,d+2\,d^2\right )}{a^2\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {2\,{\left (c-d\right )}^5}{a^2}-\frac {5\,\left (c+d\right )\,{\left (c-d\right )}^4}{2\,a^2}\right )}{f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\left (c-d\right )}^5}{6\,a^2\,f}-\frac {\left (20\,c^2\,d^3-25\,c\,d^4+10\,d^5\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-40\,c^2\,d^3+40\,c\,d^4-\frac {40\,d^5}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (20\,c^2\,d^3-15\,c\,d^4+6\,d^5\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^2\right )} \]

input
int((c + d/cos(e + f*x))^5/(cos(e + f*x)*(a + a/cos(e + f*x))^2),x)
 
output
(5*d^2*atanh(tan(e/2 + (f*x)/2))*(2*c - d)*(2*c^2 - 3*c*d + 2*d^2))/(a^2*f 
) - (tan(e/2 + (f*x)/2)*((2*(c - d)^5)/a^2 - (5*(c + d)*(c - d)^4)/(2*a^2) 
))/f - (tan(e/2 + (f*x)/2)^3*(c - d)^5)/(6*a^2*f) - (tan(e/2 + (f*x)/2)*(6 
*d^5 - 15*c*d^4 + 20*c^2*d^3) + tan(e/2 + (f*x)/2)^5*(10*d^5 - 25*c*d^4 + 
20*c^2*d^3) - tan(e/2 + (f*x)/2)^3*((40*d^5)/3 - 40*c*d^4 + 40*c^2*d^3))/( 
f*(3*a^2*tan(e/2 + (f*x)/2)^2 - 3*a^2*tan(e/2 + (f*x)/2)^4 + a^2*tan(e/2 + 
 (f*x)/2)^6 - a^2))